Uncategorized APIClass ObjectSprite ClassOn this pageSprite Class Description: A class used for creating Sprite object. Usage: local Sprite = require("Sprite")local sprite = Sprite("Image/file.png") getClips Type: Function. Description: Gets the clip names and rectangles from the clip file. Signature: getClips: function(self: SpriteClass, clipFile: string): {string: Rect} | nil Parameters: ParameterTypeDescriptionclipFilestringThe clip file name to load, should end with ".clip". Returns: Return TypeDescription{string: Rect} | nilA table containing the clip names and rectangles. __call Type: Metamethod. Description: A metamethod for creating Sprite object. Signature: metamethod __call: function(self: SpriteClass, clipStr: string): Sprite | nil Parameters: ParameterTypeDescriptionclipStrstringThe string containing format for loading a texture file.Can be "Image/file.png" and "Image/items.clip Returns: Return TypeDescriptionSprite | nilA new instance of the Sprite class. If the texture file is not found, it will return nil. __call Type: Metamethod. Description: A metamethod for creating Sprite object. Signature: metamethod __call: function(self: SpriteClass): Sprite Returns: Return TypeDescriptionSpriteA new instance of the Sprite class. __call Type: Metamethod. Description: A metamethod for creating Sprite object. Signature: metamethod __call: function(self: SpriteClass, texture: Texture2D, textureRect?: Rect): Sprite Parameters: ParameterTypeDescriptiontextureTexture2DThe texture to be used for the sprite.textureRectRect[optional] The rectangle defining the portion of the texture to use for the sprite, if not provided, the whole texture will be used for rendering. Returns: Return TypeDescriptionSpriteA new instance of the Sprite class.